#pragma once

#include <AVUIStack.h>
#include <AVUIInheritablePropertyChangeInfo.h>

namespace AVUI {

typedef ItemStructList< DependencyProperty* > DependencyPropertyList;
typedef Stack< TRefCountedPtr<DependencyPropertyList> > DependencyPropertyListStack;

struct TreeChangeInfo
{
    public:
#pragma region Internal Methods

    TreeChangeInfo() { }
    TreeChangeInfo(DependencyObject* pRoot, DependencyObject* pParent, bool isAddOperation);
    TRefCountedPtr<DependencyPropertyList> CreateParentInheritableProperties(DependencyObject* pDO, DependencyObject* pParent, bool isAddOperation);
    InheritablePropertyChangeInfo GetRootInheritableValue(DependencyProperty* pDP);
    void ResetInheritableValueIndexer();

#pragma endregion Internal Methods
 
#pragma region Internal Properties

    TRefCountedPtr<DependencyPropertyListStack> get_InheritablePropertiesStack();
    bool get_IsAddOperation();
    DependencyObject* get_Root();
    Object* get_TopmostCollapsedParentNode();
    void set_TopmostCollapsedParentNode(Object* pValue);

#pragma endregion Internal Properties

private:

#pragma region Private Fields

    TRefCountedPtr<DependencyPropertyListStack> m_pInheritablePropertiesStack;
    bool m_isAddOperation;
    TRefCountedPtr< TArray<InheritablePropertyChangeInfo> > m_rootInheritableValues;
    TRefCountedPtr<DependencyObject> m_pRootOfChange;
    TRefCountedPtr<Object> m_pTopmostCollapsedParentNode;
    int m_valueIndexer;

#pragma endregion Private Fields


};

}; // namespace AVUI




